<div class="module" id="remotetoolkit"><div class="modulebottom">
<h3>Remote Toolkit</h3>
<?php
$image = $RemoteToolkitRunning?'bullet_ball_glass_green.png':'bullet_ball_glass_red.png';
echo $html->image($image,array('style'=>'float:left'));
?>
<form>
<select name="command" id="commandselect" style="font-size:1em;width:120px;">
<option value=""></option>
<option value="enable"><?php __('Enable Restarts');?></option>
<option value="disable"><?php __('Disable Restarts');?></option>
<option value="hold"><?php __('Stop Minecraft');?></option>
<option value="unhold"><?php __('Start Minecraft');?></option>
<option value="restart"><?php __('Restart');?></option>
<option value="forcerestart"><?php __('Force Restart');?></option>
<option value="forcestop"><?php __('Force Stop');?></option>
<option value="version"><?php __('Version');?></option>
</select>
</form>
<div id="commandresult" style="font-size:0.8em"></div>
</div>
</div>
<?php
$js->get('#commandselect');
echo $js->event('change',
	$js->request(array('controller'=>'private','action'=>'sendremotecommand'),array('method'=>'post','dataExpression'=>true,'data'=>'{command:$("#commandselect").val()}','update'=>'#commandresult','type'=>'json','success'=>'$("#commandresult").val(data);'))
	);

echo $this->Js->writeBuffer();
?>